<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="SciftbcontratListForm">

        <p:panel header="#{myBundle.ListSciftbcontratTitle}">

            <p:dataTable id="datalist" value="#{sciftbcontratController.items}" var="item"
                         selectionMode="single" selection="#{sciftbcontratController.selected}"
                         rowKey="#{item.sciftbcontratid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.sciftbcontratid}" filterBy="#{item.sciftbcontratid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_sciftbcontratid}"/>
                    </f:facet>
                    <h:outputText value="#{item.sciftbcontratid}"/>
                </p:column>
                <p:column sortBy="#{item.fecha}" filterBy="#{item.fecha}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_fecha}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecha}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.remuneracion}" filterBy="#{item.remuneracion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_remuneracion}"/>
                    </f:facet>
                    <h:outputText value="#{item.remuneracion}"/>
                </p:column>
                <p:column sortBy="#{item.fechainicio}" filterBy="#{item.fechainicio}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_fechainicio}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechainicio}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.fechafin}" filterBy="#{item.fechafin}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_fechafin}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechafin}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.tipo}" filterBy="#{item.tipo}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_tipo}"/>
                    </f:facet>
                    <h:outputText value="#{item.tipo}"/>
                </p:column>
                <p:column sortBy="#{item.referencias}" filterBy="#{item.referencias}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_referencias}"/>
                    </f:facet>
                    <h:outputText value="#{item.referencias}"/>
                </p:column>
                <p:column sortBy="#{item.horario}" filterBy="#{item.horario}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_horario}"/>
                    </f:facet>
                    <h:outputText value="#{item.horario}"/>
                </p:column>
                <p:column sortBy="#{item.numero}" filterBy="#{item.numero}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_numero}"/>
                    </f:facet>
                    <h:outputText value="#{item.numero}"/>
                </p:column>
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSciftbcontratTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{sciftbcontratController.prepareCreate}" update=":SciftbcontratCreateForm" oncomplete="SciftbcontratCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":SciftbcontratViewForm" oncomplete="SciftbcontratViewDialog.show()" disabled="#{empty sciftbcontratController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":SciftbcontratEditForm" oncomplete="SciftbcontratEditDialog.show()" disabled="#{empty sciftbcontratController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{sciftbcontratController.delete}" update=":growl,datalist" disabled="#{empty sciftbcontratController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>